package com.heaven.customerServer.customerController.vo.login;

import lombok.Data;

import java.util.Date;

@Data
public class LoginRes {
    /** 登录状态；登录成功: true, 登录失败：false */
    private Boolean loginStatus;
    /** 登录成功时，返回token */
    private String token;
    /** 登录成功时，返回用户信息 */
    private UserSession userSession;

    @Data
    public static class UserSession {
        private String userId;
        private String email;
        private String phone;
        private String nickname;
        private String header; // 头像文件链接
        private Integer gender;
        private Integer status;
        private Date createTime;
        private String introduce;
    }

    public LoginRes(boolean loginStatus) {
        this.loginStatus = loginStatus;
    }

    public LoginRes(boolean loginStatus, String token, UserSession userSession) {
        this.loginStatus = loginStatus;
        this.token = token;
        this.userSession = userSession;
    }
}
